package com.zyp.messageboard.entity;

import java.util.Date;

/**
 * @author zyp
 * @version 1.0
 */
public class User {
    private Integer id;
    private String username;
    private String password;
    private String rememberMeToken;
    private Boolean onlineStatus; // 新增字段

    // Default constructor
    public User() {}

    // Parameterized constructor
    public User(Integer id, String username, String password, String rememberMeToken, Boolean onlineStatus) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.rememberMeToken = rememberMeToken;
        this.onlineStatus = onlineStatus;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRememberMeToken() {
        return rememberMeToken;
    }

    public void setRememberMeToken(String rememberMeToken) {
        this.rememberMeToken = rememberMeToken;
    }

    public Boolean getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Boolean onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", rememberMeToken='" + rememberMeToken + '\'' +
                ", onlineStatus=" + onlineStatus +
                '}';
    }
}
